package com.copenedu.web.impl;

import com.copenedu.services.impl.StudentServicesImpl;
import com.copenedu.web.support.BaseServlet;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;


@WebServlet("/luck.htm")
public class LuckServlet extends BaseServlet 
{
	@Override
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
	{
		try
		{
			StudentServicesImpl services=new StudentServicesImpl(this.parseRequest(request));
			String msg=services.luck();
			request.setAttribute("msg", msg);
		}
		catch (Exception e)
		{
			e.printStackTrace();
		}
		
		request.getRequestDispatcher("/Luck.jsp").forward(request, response);
	}

}
